<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	
	<xsl:template match="*"></xsl:template>
	
	<xsl:template match="content">
		
		<a href='/list/'>Список</a> |
		<a href="/show/{object/@id}">Просмотр</a>
		
		<h3>Привет из шаблона контента действия EDIT</h3>

		<script type="text/javascript" charset="utf-8"><xsl:comment>
			
			function validate(sId, fValidator) {
				var jField = $("#" + sId);
				jField.keyup(function(e){
					if (fValidator(jField.val())) {
						jField.parent().parent().removeClass("required");
						jField.parent().removeClass("invalid");
					} else {
						jField.parent().parent().addClass("required");
						jField.parent().addClass("invalid");
					}
				});
				jField.keyup();
			}
			
			function multiplicate(sId) {
				var jContainer = $("#" + sId);
				jContainer.append('&lt;div class="repeat_control"&gt;&lt;a href="#" class="add_field"&gt;add&lt;/a&gt;&lt;/div&gt;');
				jContainer.find(".add_field").click(function(e){
					var jClone = jContainer.clone(true).insertAfter(jContainer);
					//var jCloneField = jClone.find("#" + sId);
					//jCloneField.attr("name", jCloneField.attr("name") + "[1]");
					//jCloneField.val("");
					return false;
				});
			}

		</xsl:comment></script>
		
		<form method="POST" enctype="multipart/form-data">
			<dl class="row for_input required">
				<dt class="label"></dt>
				<dd class="field">
					<label>
						<input type="checkbox" value="1" class="text" name="Exhibit[new_1].is_published"/>
						Опубликовать
					</label>
				</dd>
			</dl>
			<dl class="row for_input required">
				<input type="hidden" class="text" name="Exhibit[new_1].oCard.card_type" value="Calendar"/>
				<dt class="label">
					<label>city</label>
				</dt>
				<dd class="field">
					<input type="text" class="text" name="Exhibit[new_1].oCard.city"/>
				</dd>
			</dl>
			<dl class="row for_input required">
				<dt class="label">
					<label>alt</label>
				</dt>
				<dd class="field">
					<input type="text" value="" name="Exhibit[new_1].oCard.oImage[new_2].alt" />
				</dd>
			</dl>
			<dl class="row for_input required">
				<dt class="label">
					<label>file</label>
				</dt>
				<dd class="field">
					<input type="file" value="" name="Exhibit[new_1].oCard.oImage[new_2].oFile.name" />
				</dd>
			</dl>
			
			
			<input type="submit" value="Сохранить"/>
		</form>
		
	</xsl:template>

</xsl:stylesheet>